Security violations in computer systems can adversely impact individuals, businesses, and governments in an increasingly technology-dependent world. As examples, malware can exploit memory corruption bugs in software and overwrite relevant aspects such as code pointers, function pointers, exception handlers, non-control data, and so forth, to transfer control flow of a program to a memory address where the attacker has loaded a malicious code stub (shellcode). This shellcode then can be used to allocate additional memory and download a larger piece of unauthorized code, which an attacker causes to execute on a target system to perform malicious tasks. Efforts to counter such attacks may be based on detection of anomalous control flow and memory accesses to provide comprehensive malware detection and prevention.